/**
 * Created by malingling on 15-12-17.
 */
app.controller('ChooseComboCtrl',function($scope,$location){
    $.ajaxSettings.async = false;
    $.getJSON('../json/data.json',function(data){
        var restaurant = Restaurant.get_restaurant()
        $scope.combos = Combo.get_combo(data,restaurant)
    })
    $scope.back_to_menu = function(combo){
        $location.path('menu');
        localStorage.setItem('name',combo.name);
        localStorage.setItem('price',combo.price)
    }
    $scope.back_to_up_page = function (){
        $location.path('menu')
    }
})